import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * The test class TestSalaireTotal.
 *
 * @author  (your name)
 * @version (a version number or a date)
 */
public class TestSalaireTotal
{
    private Employee employee1;
    
    /**
     * Default constructor for test class TestSalaireTotal
     */
    public TestSalaireTotal()
    {
    }

    /**
     * Sets up the test fixture.
     *
     * Called before every test case method.
     */
    @Before
    public void setUp()
    {
         employee1= new Employee();
        Contrat crt1 = new Contrat(employee1, 120);
         Contrat crt2 = new Contrat(employee1, 90);
          Contrat crt3 = new Contrat(employee1, 50);
          employee1.getList().add(crt1);
          employee1.getList().add(crt2);
          employee1.getList().add(crt3);
    }

    /**
     * Tears down the test fixture.
     *
     * Called after every test case method.
     */
    @After
    public void tearDown()
    {
    }

    @Test
    public void testSalaireTotal()
    {
     
        assertEquals(260,  employee1.salaireTotal());
     
    }
}

